local HITPLACES = {8288, 8289, 8290, 8291} 
local AXE = 8293
local creaturepos1 = {}
local creaturepos2 = {}
local creaturepos3 = {}
local creaturepos4 = {}
local hits = 8
local storagehit = 6565

function onUse(cid, item, frompos, item2, topos)
if item.itemid == AXE and isInArray(HITPLACES, item2.itemid) then
             if getPlayerStorageValue(cid, storagehit) < hits then
                                     if getPlayerStorageValue(cid, storagehit) == 1 then  
                              doSendMagicEffect(topos, CONST_ME_DRAWBLOOD)
                              if match.random(1,2) == 1 then       
                                     doSendMagicEffect(frompos, CONST_ME_BIGPLANTS)
                              else       
                                     doSendMagicEffect(frompos, CONST_ME_PLANTATTACK)
                              end
                              doPlayerAddHealth(cid, -300)
                              doSendAnimatedText(getThingPos(cid),"300", TEXTCOLOR_LIGHTGREEN)         
                              setPlayerStorageValue(cid, storagehit, getPlayerStorageValue(cid, storagehit) + 1)

elseif getPlayerStorageValue(cid, storagehit) == 2 then  
                              doSendMagicEffect(topos, CONST_ME_DRAWBLOOD)
                              if match.random(1,2) == 1 then       
                                     doSendMagicEffect(frompos, CONST_ME_BIGPLANTS)
                              else       
                                     doSendMagicEffect(frompos, CONST_ME_PLANTATTACK)
                              end
                              doPlayerAddHealth(cid, -300)
                              doSendAnimatedText(getThingPos(cid),"300", TEXTCOLOR_LIGHTGREEN)         
                              setPlayerStorageValue(cid, storagehit, getPlayerStorageValue(cid, storagehit) + 1)
                              doSummonCreature(creaturepos1, "Crypt Shambler")
                              doSummonCreature(creaturepos2, "Crypt Shambler")
                              doSummonCreature(creaturepos3, "Crypt Shambler")
                              doSummonCreature(creaturepos4, "Crypt Shambler")

elseif getPlayerStorageValue(cid, storagehit) == 3 then  
                              doSendMagicEffect(topos, CONST_ME_DRAWBLOOD)
                              if match.random(1,2) == 1 then       
                                     doSendMagicEffect(frompos, CONST_ME_BIGPLANTS)
                              else       
                                     doSendMagicEffect(frompos, CONST_ME_PLANTATTACK)
                              end
                              doPlayerAddHealth(cid, -300)
                              doSendAnimatedText(getThingPos(cid),"300", TEXTCOLOR_LIGHTGREEN)         
                              setPlayerStorageValue(cid, storagehit, getPlayerStorageValue(cid, storagehit) + 1)

elseif getPlayerStorageValue(cid, storagehit) == 4 then  
                              doSendMagicEffect(topos, CONST_ME_DRAWBLOOD)
                              if match.random(1,2) == 1 then       
                                     doSendMagicEffect(frompos, CONST_ME_BIGPLANTS)
                              else       
                                     doSendMagicEffect(frompos, CONST_ME_PLANTATTACK)
                              end
                              doPlayerAddHealth(cid, -300)
                              doSendAnimatedText(getThingPos(cid),"300", TEXTCOLOR_LIGHTGREEN)         
                              setPlayerStorageValue(cid, storagehit, getPlayerStorageValue(cid, storagehit) + 1)
                              doSummonCreature(creaturepos1, "Demon")
                       end
             else
                                     doSendMagicEffect(topos, CONST_ME_POFF)
             end
end
return TRUE
end
